all : search.cgi siteSubmit.cgi

CC = gcc
CFLAGS = -Wall -O2 -g
INC_PATH = cgihtml
CGIHTML_LIB = cgihtml/cgihtml.a

.c.o :
	$(CC) $(CFLAGS) -I$(INC_PATH) -c $<

search.cgi : cgiSearch.o
	$(CC) -o $@ cgiSearch.o $(CGIHTML_LIB)

siteSubmit.cgi : cgiSiteSubmit.o
	$(CC) -o $@ cgiSiteSubmit.o $(CGIHTML_LIB)

clean :
	rm *.o *.cgi -rf

cp : all
	cp *.html /var/www
	cp *.cgi /usr/lib/cgi-bin
